<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="author" content="order by dede58.com"/>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" href="img/logo.png"/>
    <title>考勤打卡办公系统</title>
    <link href="css/bootstrap.css" rel="stylesheet">
    <link rel="stylesheet" href="css/mmss.css"/>
    <link rel="stylesheet" href="css/font-awesome.min.css"/>
    <!--[if lt IE 9]>
    <script src="js/html5shiv.min.js"></script>
    <script src="js/respond.min.js"></script>
    <![endif]-->
    <style>
    </style>
</head>
<body>
<header>
    <div class="container-fluid navbar-fixed-top bg-primary">
        <ul class="nav navbar-nav  left">
            <li class="text-white h4">
                &nbsp;&nbsp;&nbsp;&nbsp;<span class="glyphicon glyphicon-leaf"></span>&nbsp;&nbsp;<b>考勤打卡办公系统</b>
            </li>
        </ul>
        <ul class="nav navbar-nav nav-pills right ">
            <li class="bg-info dropdown">
                <a class="dropdown-toggle" href="#" data-toggle="dropdown">
                    <span class="glyphicon glyphicon-user"></span>&nbsp;<span>${employee.name}</span><span
                        class="caret"></span>
                </a>
                <ul class="dropdown-menu dropdown-menu-right">
                    <li class="text-center"><a href="#"><span class="text-primary">账号设置</span></a></li>
                    <li class="text-center"><a href="#"><span class="text-primary">消息设置</span></a></li>
                    <li class="text-center"><a href="#"><span class="text-primary">帮助中心</span></a></li>
                    <li class="divider"><a href="#"></a></li>
                    <li class="text-center"><a href="#"><span class="text-primary" id="exit">退出</span></a></li>
                </ul>
            </li>
        </ul>
    </div>
</header>

<section>
    <div class="container-fluid">
        <div class="row ">
            <!--左侧导航开始-->
            <div class="col-xs-2 bg-blue">
                <br/>

                <div class="panel-group" id="accordion">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h4 class="panel-title">
                                <a data-toggle="collapse" data-parent="#accordion"
                                   href="#collapseOne">
                                    <i class="icon-home icon-large"></i> 考勤
                                </a>
                            </h4>
                        </div>
                        <div id="collapseOne" class="panel-collapse collapse in">
                            <div class="panel-body">
                                <ul class="nav nav-list menu-second">
                                    <li><a href="${pageContext.request.contextPath}/menu.action?action=punchClock">
                                        <i class="icon-user"></i> 每日打卡</a></li>
                                </ul>

                            </div>
                        </div>
                    </div>

                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h4 class="panel-title">
                                <a data-toggle="collapse" data-parent="#accordion"
                                   href="#collapseTwo">
                                    <i class="icon-book icon-large"></i>员工档案
                                </a>
                            </h4>
                        </div>
                        <div id="collapseTwo" class="panel-collapse collapse">
                            <div class="panel-body">
                                <ul class="nav nav-list menu-second">
                                    <li><a href="#"><i class="icon-user"></i> 查看个人信息</a></li>
                                    <li><a href="#"><i class="icon-edit"></i> 重置密码</a></li>
                                </ul>
                            </div>
                        </div>
                    </div>
                    <c:if test="${employee.positionId==1}">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h4 class="panel-title">
                                    <a data-toggle="collapse" data-parent="#accordion"
                                       href="#collapseThree">
                                        <i class="icon-book icon-large"></i>员工管理
                                    </a>
                                </h4>
                            </div>
                            <div id="collapseThree" class="panel-collapse collapse">
                                <div class="panel-body">
                                    <ul class="nav nav-list menu-second">
                                        <li><a href="${pageContext.request.contextPath}/menu.action?action=Staffmanage">
                                            <i class="icon-user" id="addyg"></i> 新增员工</a></li>
                                        <li><a href="#"><i class="icon-edit"></i> 查询员工</a></li>
                                    </ul>
                                </div>
                            </div>
                        </div>
                    </c:if>

                    <div class="panel panel-default">
                        <div class="panel-heading">
                            <h4 class="panel-title">
                                <a data-toggle="collapse" data-parent="#accordion"
                                   href="#collapseFour">
                                    <i class="icon-book icon-large"></i>考勤管理
                                </a>
                            </h4>
                        </div>
                        <div id="collapseFour" class="panel-collapse collapse">
                            <div class="panel-body">
                                <ul class="nav nav-list menu-second">
                                    <li>
                                        <a href="${pageContext.request.contextPath}/menu.action?action=ygStatistics">
                                            <i class="icon-user"></i> 考勤记录</a></li>
                                    <c:if test="${employee.positionId==1}">
                                        <li><a href="#"><i class="icon-edit"></i>考勤统计</a></li>
                                    </c:if>

                                </ul>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!--左侧导航结束-->
            <!----------------------------------------------------------------------------------------------------->
            <!--右侧内容开始-->
            <div class="col-xs-10">
                <div>${mainRight}</div>
                <!--右侧内容,动态包含-->
                <jsp:include page="${mainRight == null? '/jsp/blank.jsp' : mainRight}"></jsp:include>
                <!----------------------------------------------------------    ------------------------------------------->
            </div>
            <!--右侧内容结束-->
        </div>
    </div>
</section>

<footer class="bg-primary navbar-fixed-bottom">
    <p class="text-center text-white">版权所有&copy;MMSS</p>
</footer>

<script src="js/jquery-1.11.3.js"></script>
<script src="js/bootstrap.js"></script>


<script>
    //将退出按钮的id设置为exit，然后将这个函数在公共文件里面即可
    $("#exit").on("click",function(){
        sessionStorage.clear()   //清除所有session值
        window.location.href = "loigin.jsp";
    })
</script>

</body>
</html>